//
//  ShopcartTableHeaderView.m
//  TerritoryShopkeeper
//
//  Created by 李小龙 on 2017/12/28.
//  Copyright © 2017年 ZDQK. All rights reserved.
//

#import "ShopcartTableHeaderView.h"

@implementation ShopcartTableHeaderView

- (instancetype)init {
    self = [super init];
    if (self) {
        [self createUI];
    }
    return self;
}
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createUI];
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    [self createUI];
}

- (void)createUI {
    self.view = [[NSBundle mainBundle] loadNibNamed:@"ShopcartTableHeaderView" owner:self options:nil].lastObject;
    [self.view setFrame:self.bounds];
    [self addSubview:self.view];
}

- (IBAction)scrapeButtonAction:(id)sender {
    if (self.scrapeBlock) {
        self.scrapeBlock();
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
